<script type="text/javascript">
     $(document).ready(function(){
       $('#myPageFlip').jPageFlip({
         width: 375,
         height: 600
         // other parameters
       });
     });
</script>
<div id="myPageFlip">
	<img src="/bookstore/img/pages/clear.jpg" class="jPageFlip flipper">		
<?php foreach($pages as $page):?>
	<img src="/bookstore/img/pages/<?php echo $page;?>" class="jPageFlip flipper">
<?php endforeach;?>
</div>